package cn.rengy.web.framework.wxmp.miniprogram;

import cn.rengy.lang.ResultEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class PhoneNumberController {

    @Autowired
    private PhoneNumberService phoneNumberService;

    /**
     * 根据code和appid获取手机号
     * @param getPhoneNumberVO
     * @return
     */
    @RequestMapping(value="/wxmnp/getPhoneNumber",method = RequestMethod.POST)
    @ResponseBody
    public ResultEntity getPhoneNumber (@RequestBody GetPhoneNumberVO getPhoneNumberVO)  {
        return ResultEntity.ok(phoneNumberService.getPhoneNumber(getPhoneNumberVO));
    }



}
